﻿using System;
using System.Runtime.Serialization;
using Invoicing.Model.Members;
using Invoicing.Model.Products;
namespace Invoicing.Model.Orders
{
    [DataContract]
    public class ProductOrderModel:MBase
    {
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public int ID { get; set; }
        [Model]
        [DataMember]
        public string OrderNo { get; set; }
        [Model]
        [DataMember]
        public System.DateTime NoteDate { get; set; }
        [Model]
        [DataMember]
        public int HouseID { get; set; }
        [Model]
        [DataMember]
        public int OperatorUserID { get; set; }
        [Model(ConvertType = AttributeType.IgnoreUpdate)]
        [DataMember]
        public System.DateTime CreatedOn { get; set; }
        [Model]
        [DataMember]
        public decimal TotalMoney { get; set; }
        [Model]
        [DataMember]
        public int Method { get; set; }
        [Model]
        [DataMember]
        public Nullable<int> AssociatedDealID { get; set; }
        [Model]
        [DataMember]
        public string Description { get; set; }

        #region Help
        [DataMember]
        public ProductOrderDetailCollection Items { get; set; }
        [DataMember]
        public WarehouseModel Warehouse { get; set; }
        [DataMember]
        public DealOrderModel AssociatedDealOrder { get; set; }
        [DataMember]
        public string Operator { get; set; }
        #endregion
    }

    [DataContract]
    public class ProductOrderCollection : ModelCollectionBase<ProductOrderModel> {}
}
